import request from '@/utils/request'
//新接口
export function getOrderStatic(){
  return request({
    url:'/statistics/orderStatistics',
    method:'get',
  })
}

export function getOrderTypeCount(){
  return request({
    url:'/statistics/ordersTypeCount',
    method:'get',
  })
}

export function fetchList(params) {
  return request({
    url:'/statistics/orderConditions',
    method:'get',
    params
  })
}


export function getpublishMan(params) {
  return request({
    url:'/user/obtainNameIcon',
    method:'get',
    params
  })
}

export function getOrderDetail(id) {
  return request({
    url:'/statistics/orderConditions',
    method:'get',
    params:{
      orderId:id,
      limit:1,
      page:1,
      createTime:null,
      orderStatus:null,
      phone:null
    }
  });
}


// old



export function closeOrder(params) {
  return request({
    url:'/order/update/close',
    method:'post',
    params:params
  })
}

export function deleteOrder(params) {
  return request({
    url:'/order/delete',
    method:'post',
    params:params
  })
}

export function deliveryOrder(data) {
  return request({
    url:'/order/update/delivery',
    method:'post',
    data:data
  });
}



export function updateReceiverInfo(data) {
  return request({
    url:'/order/update/receiverInfo',
    method:'post',
    data:data
  });
}

export function updateMoneyInfo(data) {
  return request({
    url:'/order/update/moneyInfo',
    method:'post',
    data:data
  });
}

export function updateOrderNote(params) {
  return request({
    url:'/order/update/note',
    method:'post',
    params:params
  })
}
